{{ define "main" }}
<div ref="streamContainer" class="stream-container">
    <div class="post-list-container post-list-container-shadow">
        <a class="a-block">
            <div class="post-item-wrapper post-item-wrapper-no-hover">
                <div class="post-item post-item-no-gaps">
                    <div class="post-item-info-wrapper">
                        <div class="post-item-title post-item-title-small">
                            {{.Title}}
                        </div>
                    </div>
                </div>
            </div>
        </a>
        <div class="tagcloud">
            {{ if ne (len $.Site.Taxonomies.tags) 0 }}
            {{$largestFontSize:=1.5}}
            {{$smallestFontSize:=1.25}}
            {{ $max := add (len (index $.Site.Taxonomies.tags.ByCount 0).Pages) 1}}
            {{ $min := len (index $.Site.Taxonomies.tags.ByCount.Reverse 0).Pages}}
            {{ $fontSizeStep := div (sub $largestFontSize $smallestFontSize) (sub $max $min)}}
            {{ range $name,$taxonomies := $.Site.Taxonomies.tags }}
            {{ $tagCount := len $taxonomies.Pages }}
            {{ $fontSize := (add $smallestFontSize (mul (sub $tagCount $min) $fontSizeStep))}}
            <a href="{{ $taxonomies.Page.Path | absURL}}" class="tagcloud-item" style="font-size: {{$fontSize}}rem;">
                {{$name}}<sup>{{$tagCount}}</sup>
            </a>
            {{ end }}
            {{end}}
        </div>
    </div>
</div>

{{ end }}